#pragma once
#include "ckObject.h"
#include "zCore.h"
#include <map>
#include <string>

namespace ck
{
	class Value;

	namespace data
	{
		class ZCORE_API MetaGroup : public ckObject
		{
		public:
			MetaGroup();
			virtual ~MetaGroup();

		public:
			
			void		Reset();
			void		Next();
			bool		IsEOF();

			const char*	GetKey();
			Value*		GetValue();			

			RESULTCODE	Set(const char* szKey, Value* pValue);

		public:
			RESULTCODE	SetName(const char* szName);
			const char*	GetName();

		protected:
			void	Cleanup();

		protected:
			std::string m_name;
			std::map<std::string, Value*>	m_pairs;
			std::map<std::string, Value*>::iterator	m_iter;
		};
	}
}

